home *** CD-ROM | disk | FTP | other *** search
/ Do It! 2 / Do It! Volume 2.iso / for_amiga / diavolodemo / db302dem.lha / Misc / API / DiavoloAPI.h < prev    next >
C/C++ Source or Header  |  1995-10-11  |  57KB  |  1,189 lines

  1. /* Diavolo API Header File
  2.  
  3.    © 1995 Martin Korndörfer
  4.  
  5.    V 1.30
  6. */
  7.  
  8.  
  9. /* *********************************************************************** */
  10. /* *********************************************************************** */
  11. /*                                                                         */
  12. /* API Structures and misc. values                                         */
  13. /*                                                                         */
  14. /* *********************************************************************** */
  15. /* *********************************************************************** */
  16.  
  17.  
  18. #define     RENDEZVOUS_NAME     "Diavolo.%ld"      /* '%ld' will be replaced by 1, or a higher number if
  19.                                                       'Diavolo.1' already exists in the system port list */
  20.  
  21.  
  22. /* The following structure will be used to send commands to Diavolo.
  23.  
  24.    It will also used by Diavolo to send reports and requests to the
  25.    caller.
  26. */
  27.  
  28. struct      DiavoloAPIMsg
  29. {
  30.     struct  Message     DAPI_Message;               /* Exec message structure */
  31.  
  32.     LONG                DAPI_Command;               /* Command */
  33.  
  34.     LONG                DAPI_Arg1, DAPI_Arg2;
  35.     LONG                DAPI_Arg3, DAPI_Arg4;       /* Misc. arguments */
  36.  
  37.     APTR                DAPI_Ptr1, DAPI_Ptr2;
  38.     APTR                DAPI_Ptr3, DAPI_Ptr4;       /* Misc. pointer */
  39.  
  40.     LONG                DAPI_Errorcode;             /* Errorcode, set in replied message */
  41. };
  42.  
  43.  
  44. /* The following structure is used by Diavolo to return its actual
  45.    status and progression report.
  46.  
  47.    Use DAPI_INQUIRY to fill it with data
  48. */
  49.  
  50. struct      DiavoloInquiry
  51. {
  52.     ULONG               DAPI_Magic;                 /* Magic Value, see below */
  53.     ULONG               DAPI_Size;                  /* Size of this structure */
  54.  
  55.     ULONG               DAPI_ActualStatus;          /* See defines below */
  56.  
  57.     ULONG               DAPI_BackupMedium;          /* See defines in DiavoloPrefs.h (MEDIUM_xxx) */
  58.  
  59.  
  60.     /* The following values are only valid while an operation is in process or while
  61.        the statistic is displayed */
  62.  
  63.     char                DAPI_BackName[60];          /* Name of backup */
  64.     struct DateStamp    DAPI_Created;               /* Creation date of backup */
  65.     ULONG               DAPI_ID;                    /* ID of backup */
  66.     ULONG               DAPI_BackSize;              /* Size of backup */
  67.     ULONG               DAPI_BackFiles;             /* Files in backup */
  68.     ULONG               DAPI_BackDirs;              /* Dirs in backup */
  69.     ULONG               DAPI_BackVolumes;           /* Number of partitions in backup */
  70.  
  71.  
  72.     char                DAPI_File[35];              /* Current Filename being processed */
  73.     char                DAPI_Dir[400];              /* Current Directory being processed */
  74.     ULONG               DAPI_FileCount;             /* Number of files processed (incl. acutal file) */
  75.     ULONG               DAPI_DirCount;              /* Number of dirs processed (incl. actual dir) */
  76.     ULONG               DAPI_ByteCount;             /* Number of bytes processed */
  77.  
  78.     ULONG               DAPI_Written;               /* Number of bytes written/read to/from medium */
  79.  
  80.     /* The following fields are valid when saving/restoring to/from a file (some fields also used with
  81.        direct medium backups) */
  82.  
  83.     ULONG               DAPI_MediumFree;            /* Number of bytes free on medium */
  84.     ULONG               DAPI_MediumSize;            /* Size of medium */
  85.     char                DAPI_BackFile[400];         /* Name of file to backup to */
  86.  
  87.     /* The following fields are valid when saving/restoring to/from tape (some fields also used with
  88.        direct medium backups)*/
  89.  
  90.     UBYTE               DAPI_TapeStatus;            /* See defines below */
  91.     ULONG               DAPI_TapeBlockCount;        /* Number of blocks written/read */
  92.     ULONG               DAPI_TapeNum;               /* Number of tape or medium writing/readin to/from */
  93.  
  94.     /* The following fields are valid when saving/restrong to/from disk */
  95.  
  96.     UBYTE               DAPI_DiskStatus[4];         /* See defines below */
  97.     UBYTE               DAPI_DiskTrack[4];          /* Actual track writing/reading */
  98.     ULONG               DAPI_DiskSize[4];           /* Size of disk in drive */
  99.     UWORD               DAPI_DisksDone;             /* Disks written yet */
  100.  
  101.  
  102.     /* The following fields are valid when comparing or restoring */
  103.  
  104.     ULONG               DAPI_FilesOk;               /* Number of files identical */
  105.     ULONG               DAPI_FilesDiff;             /* Number of files not identical */
  106.     ULONG               DAPI_FilesUnread;           /* Number of files not readable */
  107.     ULONG               DAPI_FilesMiss;             /* Number of files not on hd */
  108.     ULONG               DAPI_FilesNewer;            /* Number of files newer on hd */
  109.     ULONG               DAPI_HeaderMis;             /* Number of files with diff. headers */
  110.     ULONG               DAPI_LinkErr;               /* Number of unresolvable links */
  111.  
  112.  
  113.     /* The following fields are only valid while backup, when packer is active */
  114.  
  115.     ULONG               DAPI_Unpacked;              /* Processed bytes, unpacked */
  116.     ULONG               DAPI_Packed;                /* Processed bytes, packed */
  117. };
  118.  
  119. #define     INQ_MAGIC               0xf18ab128      /* Magic value for DiavoloInquiry */
  120.  
  121. /* Values for DAPI_ActualStatus */
  122. #define     INQSTATUS_MENU          0               /* Main menu */
  123. #define     INQSTATUS_DEVSELBACK    1               /* Device selection for backup */
  124. #define     INQSTATUS_DEVSELREST    2               /* Device selection for restore */
  125. #define     INQSTATUS_DEVSELCOMP    3               /* Device selection for compare */
  126. #define     INQSTATUS_BACKUP        4               /* Backup operation */
  127. #define     INQSTATUS_BACKUPSTAT    5               /* Statistics after backup complete */
  128. #define     INQSTATUS_SCANNING      6               /* Scanning for backup index */
  129. #define     INQSTATUS_RESTORE       7               /* Restore operation */
  130. #define     INQSTATUS_RESTORESTAT   8               /* Statistics after restore complete */
  131. #define     INQSTATUS_COMPARE       9               /* Compare operation */
  132. #define     INQSTATUS_COMPARESTAT   10              /* Statistics after compare complete */
  133. #define     INQSTATUS_IMMEDCOMPARE  11              /* Compare right after backup (without scan) */
  134. #define     INQSTATUS_UNKNOWN       ~0              /* Current INQSTATUS undefined */
  135.  
  136. /* Values for DAPI_TapeStatus */
  137. #define TAPSTAT_REWIND          1                   /* Tape is rewinding */
  138. #define TAPSTAT_SEEK            2                   /* Tape is seeking position */
  139. #define TAPSTAT_WRITEINDEX      3                   /* Writing index on tape */
  140. #define TAPSTAT_READINDEX       4                   /* Reading index from tape */
  141. #define TAPSTAT_STANDBY         5                   /* Tape standing by */
  142. #define TAPSTAT_WRITING         6                   /* Writing data to tape */
  143. #define TAPSTAT_READING         7                   /* Reading data from tape */
  144. #define TAPSTAT_PARTITION       8                   /* Partitioning tape */
  145.  
  146. /* Values for DAPI_DiskStatus */
  147. #define DSKSTAT_UNUSED          0                   /* Disk drive unused or not available */
  148. #define DSKSTAT_NODISK          1                   /* No disk in drive */
  149. #define DSKSTAT_BUSY            2                   /* Disk busy (writing or reading) */
  150. #define DSKSTAT_REMOVE          3                   /* Remove disk from drive */
  151. #define DSKSTAT_ERROR           4                   /* Error reading/writing disk */
  152. #define DSKSTAT_READY           5                   /* Disk ready in drive */
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160. /* *********************************************************************** */
  161. /* *********************************************************************** */
  162. /*                                                                         */
  163. /* Commands                                                                */
  164. /*                                                                         */
  165. /* *********************************************************************** */
  166. /* *********************************************************************** */
  167.  
  168.  
  169.  
  170. /* *********************************************************************** */
  171. /* Misc. Commands                                                          */
  172. /* *********************************************************************** */
  173.  
  174. #define     DAPI_RENDEZVOUS         0x0000001
  175.             /* Setup communication with Diavolo
  176.  
  177.                This command has to be sent to Diavolo to start the communication.
  178.  
  179.                Most other commands require that the caller has introduced itself
  180.                with this message first.
  181.  
  182.                If another process is currently communicating with Diavolo, this
  183.                command will fail with DAPI_Errorcode set to DAPI_EC_INUSE.
  184.  
  185.                The mn_ReplyPort of this message will be used by Diavolo to send
  186.                its messages to the communicating process, so it's neccessary to
  187.                use a permanent message port as the reply port for this message.
  188.                This port HAS to be monitored for messages, as Diavolo sends all
  189.                user requests to it and they must be answered.
  190.  
  191.                Returnvalues:
  192.  
  193.                Arg1:    Diavolo Version         (even if request fails)
  194.                Arg2:    Diavolo Revision        (even if request fails)
  195.             */
  196.  
  197.  
  198. #define     DAPI_GOODBYE            0x0000002
  199.             /* Shut down communication with Diavolo
  200.  
  201.                A process that has initiated communication with Diavolo via
  202.                DAPI_RENDEZVOUS has to release it with command when finished.
  203.  
  204.                Diavolo cannot (and will not) remove itself from memory when
  205.                a process has had a RENDEZVOUS but not said GOODBYE yet.
  206.  
  207.                Only after this command has returned successfully, it's save
  208.                to delete the message port you've been using to communicate with
  209.                Diavolo (ReplyPort of your DAPI_RENDEZVOUS command).
  210.  
  211.                The command will fail if there is any operation pending (backup,
  212.                restore or compare) with error code DAPI_EC_OPPENDING. Use
  213.                DAPI_ABORTOPERATION first in this case.
  214.             */
  215.  
  216.  
  217. #define     DAPI_LOCKUI             0x0000003
  218.             /* Lock User Interface
  219.  
  220.                Arg1:    TRUE: lock, FALSE: unlock user interface
  221.  
  222.                While controling Diavolo, the user is still able to use the buttons
  223.                and menus. To prevent the user from interfering with the intended
  224.                operation, you can lock all user interface elements, i.e. all mouse,
  225.                keyboard and menu actions.
  226.  
  227.                The user will still be able to PRESS a button, but it will have no
  228.                effect.
  229.  
  230.                After an operation has been started, you should unlock the interface,
  231.                so that the user may pause or abort the operation.
  232.             */
  233.  
  234.  
  235. #define     DAPI_ABORTOPERATION     0x0000004
  236.             /* Aborts an operation (backup, restore or compare)
  237.  
  238.                This command is only valid while Diavolo is doing an operation. When
  239.                this message is sent, Diavolo will cancel this operation immediately.
  240.             */
  241.  
  242.  
  243. #define     DAPI_INQUIRY            0x0000005
  244.             /* Get actual status
  245.  
  246.                This command is valid even if the caller has not made a rendezvous
  247.                with Diavolo.
  248.  
  249.                Ptr1     Pointer to allocated DiavoloInquiry structure.
  250.  
  251.                Arg1     Size of structure.
  252.  
  253.                When this message is replied, the fields of the DiavoloInquiry structure
  254.                are filled according the actual status.
  255.  
  256.                Be prepared that this data may change in the future. As long as
  257.                the INQ_MAGIC value hasn't changed, you can assume that the
  258.                existing data is as defined. DAPI_Size could report a larger
  259.                size than expected if the structure has been expanded, though.
  260.             */
  261.  
  262.  
  263. /* *********************************************************************** */
  264. /* Main Menu Commands                                                      */
  265. /* *********************************************************************** */
  266.  
  267. #define     DAPI_QUIT               0x0010001
  268.             /* Quit Diavolo Backup.
  269.  
  270.                Diavolo will quit itself. When finished it sends a DAPI_CLOSEDOWN
  271.                message to the caller. Send a DAPI_GOODBYE to release the message-
  272.                port.
  273.  
  274.                This command aborts all pending operations. Diavolo will quit
  275.                immediatelay after all resources have been released.
  276.             */
  277.  
  278.  
  279. #define     DAPI_LOADCONFIG         0x0010002
  280.             /* Load a configuration file.
  281.  
  282.                Ptr1:    Pointer to filename (C-String, 0 terminated)
  283.  
  284.                Returnvalues:
  285.  
  286.                Arg1:    Success (TRUE/FALSE)
  287.  
  288.                Use this command to set the various settings of Diavolo Backup.
  289.                If the load fails, Diavolo will send a DAPI_RC_LOADPREFSERR message.
  290.                You can reply this message with -1 to display the error requester
  291.                or 0 to ignore it.
  292.  
  293.                You can load a new configuration while an operation is in progress,
  294.                but only some of the new settings will affect the current operation.
  295.             */
  296.  
  297. #define     DAPI_SAVECONFIG         0x0010003
  298.             /* Save a configuration file.
  299.  
  300.                Ptr1:    Pointer to filename (C-String, 0 terminated)
  301.  
  302.                Returnvalues:
  303.  
  304.                Arg1:    Success (TRUE/FALSE)
  305.  
  306.                Use this command to save the current settings of Diavolo Backup.
  307.                See DAPI_LOADCONFIG for further details.
  308.             */
  309.  
  310. #define     DAPI_ASKCONFIG          0x0010004
  311.             /* Get the current configuration structure
  312.  
  313.                Ptr1:    Pointer to allocated memory area, large enough to hold
  314.                         the configuration data (see DiavoloPrefs.h)
  315.                Arg1:    Size of memory area
  316.  
  317.                This function returns the current configuration structure des-
  318.                cribed in DiavoloPrefs.h.
  319.  
  320.                Be prepared that this data may change in the future. As long as
  321.                the PRF_MAGIC value hasn't changed, you can assume that the
  322.                existing data is as defined. prf_Size could report a larger
  323.                size than expected if the structure has been expanded, though.
  324.             */
  325.  
  326. #define     DAPI_CHANGECONFIG       0x0010005
  327.             /* Change the actual configuration.
  328.  
  329.                Ptr1:    Pointer to configuration structure
  330.  
  331.                *NEVER EVER* create a configuration structure yourself.
  332.                Instead, get the current structure with DAPI_ASKCONFIG, make
  333.                the neccessary adjustments and return it with this command.
  334.  
  335.                You can change the configuration while an operation is in progress,
  336.                but only some of the new settings will affect the current operation.
  337.             */
  338.  
  339. #define     DAPI_CLEARLISTS         0x0010006
  340.             /* Clears all previous selection lists.
  341.  
  342.                Works just like the respective menu item. Should be called before
  343.                any programmed operation to make sure that there are no previous
  344.                selections left.
  345.  
  346.                This call also updates the list of devices listed by Diavolo.
  347.             */
  348.  
  349. #define     DAPI_MAINMENU           0x0010007
  350.             /* Return to the main menu
  351.  
  352.                This command is valid when Diavolo is in the device selection
  353.                or when an operation has been completed while the statistics
  354.                are displayed.
  355.             */
  356.  
  357. #define     DAPI_CREATEREPORT       0x0010008
  358.             /* Create file or error list
  359.  
  360.                This command can used after an operation has been completed.
  361.  
  362.                Arg1:    TRUE: Create Filelist, FALSE: Create Errorlist
  363.                Arg2:    TRUE: Use wide format (136 chars per line),
  364.                         FALSE: Use normal format (80 chars per line).
  365.                         Only used whith filelists.
  366.  
  367.                Ptr1:    Pointer to name of destination file, can also
  368.                         be "prt:" to print the report.
  369.                         NULL: prompt user for filename.
  370.             */
  371.  
  372. #define     DAPI_SCSICOMMAND        0x0010009
  373.             /* Send a command to an SCSI tape device
  374.  
  375.                Arg1:    Command to send
  376.                         1: Erase tape
  377.                         2: Scan tape (not implemented before 1.34)
  378.                         3: Eject tape
  379.                         4: Rewind tape
  380.                         5: Retense tape
  381.                         6: Show tape contents
  382.  
  383.                Works just as the respective menu function. Erase tape
  384.                will ask the user if he really wants to erase the tape
  385.                and if a full or fast erase should performed. The application
  386.                can capture these requests and answer them automatically
  387.                as needed.
  388.             */
  389.  
  390.  
  391. /* *********************************************************************** */
  392. /* Backup requests                                                         */
  393. /* *********************************************************************** */
  394.  
  395. #define     DAPI_INITBACKUP         0x0020001
  396.             /* Initiate a backup operation.
  397.  
  398.                This call is only valid if the main menu is active. Diavolo switches
  399.                to the Device Selection window.
  400.  
  401.                You should call DAPI_CLEARLISTS before or after this call to make
  402.                sure that there is no previous selection left, before making any
  403.                new selections.
  404.  
  405.                The backup destination can be set by DAPI_CHANGECONFIG or
  406.                DAPI_LOADCONFIG.
  407.             */
  408.  
  409. #define     DAPI_USEFILTER          0x0020002
  410.             /* A given filter will be used to select files to backup.
  411.  
  412.                Ptr1:    Pointer to filename of filter (C-String)
  413.  
  414.                Return values:
  415.  
  416.                Arg1:    Number of Partitions currently selected
  417.                Arg2:    Number of Directories currently selected
  418.                Arg3:    Number of Files currently selected
  419.                Arg4:    Size of all selected files
  420.  
  421.                For description of filters see the example filter found in
  422.                the package.
  423.             */
  424.  
  425. #define     DAPI_BACKSELECT         0x0020003
  426.             /* Select or deselect files.
  427.  
  428.                Arg1:    Mode
  429.                           DAPI_SEL_INCLUDE : Include files
  430.                           DAPI_SEL_EXCLUDE : Exclude files
  431.                           DAPI_SEL_IMAGE   : Add Image Backup
  432.                           DAPI_SEL_MOVIE   : Add MovieShop Backup
  433.  
  434.                DAPI_SEL_INCLUDE and DAPI_SEL_EXCLUDE:
  435.                    Ptr1:    Pointer to Partition name for selection
  436.                    Ptr2:    Pointer to relative path on this partition, inkl. Pattern
  437.                    Ptr3:    Pointer to date string or NULL if no date selection
  438.                    Ptr4:    Pointer to pattern for directory scan or NULL if all
  439.                             directories should be scanned
  440.  
  441.                    Arg2:    0: Ignore Archive, 1: Arch. set, 2: Arch. unset
  442.                    Arg3:    TRUE: Include Subdirectories
  443.                    Arg4:    TRUE: Ignore empty directories
  444.  
  445.                DAPI_SEL_IMAGE:
  446.                    Ptr1:    Pointer to Devicename for Image Backup
  447.  
  448.                    Arg2:    TRUE if only used blocks should be saved
  449.  
  450.                DAPI_SEL_MOVIE:
  451.                    Ptr1:    Pointer to path for MovieShop project file
  452.  
  453.  
  454.                Use this command to build a selection list manually.
  455.  
  456.                To create a list of files to backup, set Arg1 to DAPI_SEL_INCLUDE and
  457.                DAPI_SEL_EXCLUDE resp.
  458.  
  459.                     If a partition is selected the first time, it will be scanned before
  460.                     selecting anything. You can then use the same partition as often
  461.                     as neccessary to add or remove files from the selection.
  462.  
  463.                     The 'Partition' can also be a path to a subdirectory. In that case,
  464.                     only THIS directory will be scanned. Use this only if you want to save
  465.                     a part of a partition.
  466.  
  467.                     Assignments, even multiple assignments, can be used as Partitions. See
  468.                     descriptions of filters for restrictions with multiple assignments.
  469.  
  470.                     All other parameters are used exactly the same way as in filers.
  471.  
  472.  
  473.                To add a Image Backup to the list set Arg1 to DAPI_SEL_IMAGE.
  474.  
  475.                     A semicolon at the Device name is optional.
  476.  
  477.                     If the given Partition is recognized by Diavolo, it will save only
  478.                     used blocks, if Arg2 is TRUE. Otherwise, Arg2 will be ignored.
  479.  
  480.                     It's not possible to remove an image backup from the list using the
  481.                     API.
  482.  
  483.  
  484.                To add a MovieShop Backup to the list set Arg1 to DAPI_SEL_MOVIE.
  485.  
  486.                     Ptr1 must point to a MovieShop project file. All neccessary data
  487.                     will be derived from that file.
  488.  
  489.                     If the movieshop.library could not be found, the options will fail.
  490.  
  491.                     It's not possible to remove an MovieShop backup from the list using
  492.                     the API.
  493.  
  494.  
  495.                Return values:
  496.  
  497.                Arg1:    Number of Partitions currently selected
  498.                Arg2:    Number of Directories currently selected
  499.                Arg3:    Number of Files currently selected
  500.                Arg4:    Size of all selected files
  501.  
  502.                if DAPI_Errorcode is set to DAPI_EC_SELECTFAILED then
  503.                Arg1:    Failure code
  504.                         0: Memory error
  505.                         1: Partition not found
  506.                         2: Error while scanning partition
  507.                         3: No lock on partition (when used as subdirectory)
  508.                         4: No Partition given
  509.                         5: No MainVolume (internal error)
  510.                         6: Error locating device for image backup
  511.                         7: Error reading MovieShop project file
  512.                         8: Unsupported value for Arg1
  513.  
  514.  
  515.             */
  516.  
  517. #define     DAPI_STARTBACKUP        0x0020004
  518.             /* Start backup operation
  519.  
  520.                Arg1:    TRUE: Use PW
  521.                Arg2:    TRUE: Enocode data (only valid if Arg1 TRUE)
  522.                Arg3:    Only when saving to SCSI tape:
  523.                         0: Ask user
  524.                         1: Overwrite tape from beginning
  525.                         x: Overwrite tape from backup x (inlcuding), first backup is no. 1
  526.                         ~0: (all bits set) Append to end of last backup on tape.
  527.  
  528.                Ptr1:    Pointer to name of backup (max. 59 chars).
  529.                Ptr2:    Pointer to password (only valid if Arg1 TRUE, max 10 chars).
  530.  
  531.                After you've selected all files to backup using DAPI_USEFILTER and/or
  532.                DAPI_BACKSELECT you can start the backup procedure with this command.
  533.  
  534.                This message won't be replied until the backup operation is complete
  535.                or aborted due to an error or user intervention.
  536.  
  537.                Return values:
  538.  
  539.                Arg1:    Number of bytes read
  540.                Arg2:    Number of bytes written to medium
  541.                Arg3:    Time in seconds
  542.  
  543.                if DAPI_Errorcode is set to DAPI_EC_OPFAILED then
  544.                Arg1:    Failure code
  545.                         0: Backup could not be started (no files selected, no backup medium etc.)
  546.                         1: Misc. error while backup in progress
  547.             */
  548.  
  549.  
  550. #define     DAPI_COMPAREBACKUP      0x0020005
  551.             /* Compare a backup right after its completion.
  552.  
  553.                When a backup has been completed and the statistics are displayed, you
  554.                can either use DAPI_MAINMENU to return to the main menu or you can
  555.                use this command to compare the backup. This is the same as pressing
  556.                the 'Compare' button in the statistics window.
  557.  
  558.                This message won't be replied until the compare operation is complete
  559.                or aborted due to an error or user intervention.
  560.  
  561.                Return values:
  562.  
  563.                Arg1:    Number of bytes read/compared
  564.                Arg2:    Time in seconds
  565.  
  566.                if DAPI_Errorcode is set to DAPI_EC_OPFAILED then
  567.                Arg1:    Failure code
  568.                         0: Backup could not be started (no files selected, no backup medium etc.)
  569.                         1: Misc. error while backup in progress
  570.                */
  571.  
  572.  
  573. /* *********************************************************************** */
  574. /* Compare / Restore requests                                              */
  575. /* *********************************************************************** */
  576.  
  577. #define     DAPI_INITCOMPARE        0x0030001
  578.             /* Initiate a compare operation.
  579.  
  580.                This call is only valid if the main menu is active. Diavolo switches
  581.                to the Device Selection window.
  582.  
  583.                You should call DAPI_CLEARLISTS before or after this call to make
  584.                sure that there is no previous selection left, before making any
  585.                new selections.
  586.  
  587.                The compare source can be set by DAPI_CHANGECONFIG or
  588.                DAPI_LOADCONFIG.
  589.             */
  590.  
  591. #define     DAPI_INITRESTORE        0x0030002
  592.             /* Initiate a restore operation.
  593.  
  594.                This call is only valid if the main menu is active. Diavolo switches
  595.                to the Device Selection window.
  596.  
  597.                You should call DAPI_CLEARLISTS before or after this call to make
  598.                sure that there is no previous selection left, before making any
  599.                new selections.
  600.  
  601.                The restore source can be set by DAPI_CHANGECONFIG or
  602.                DAPI_LOADCONFIG.
  603.             */
  604.  
  605. #define     DAPI_STARTSCAN          0x0030003
  606.             /* Scan backup medium for index
  607.  
  608.                Arg1:    Only when scanning SCSI tape:
  609.                         0:  Ask user
  610.                         1:  Number of backup to scan, beginning with 1.
  611.                         ~0: Last backup on tape
  612.  
  613.                Ptr1:    Pointer to Password or NULL when none given
  614.                         (Diavolo will ask if PW is required then).
  615.  
  616.                After this operation has succeeded, all Partitions of the scanned
  617.                backup are displayed in the list. Then you can use DAPI_RESTSELECT
  618.                to assign destination paths and to select / deselect files.
  619.  
  620.                This message won't be replied until the scanning operation is complete
  621.                or aborted due to an error or user intervention.
  622.  
  623.                Return values:
  624.  
  625.                Arg1:    Size of scanned backup in bytes
  626.  
  627.                Ptr1:    Pointer to Backupname
  628.                Ptr2:    Pointer to Creation time (struct DateStamp *)
  629.  
  630.                if DAPI_Errorcode is set to DAPI_EC_OPFAILED then
  631.                Arg1:    Failure code
  632.                         0: Scan could not be started (no backup medium etc.)
  633.                         1: Misc. error while scan in progress
  634.             */
  635.  
  636. #define     DAPI_RESTSELECT         0x0030004
  637.             /* Select or deselect files and set destination paths for restore or
  638.                compare.
  639.  
  640.                Arg1:    Mode
  641.                           DAPI_SEL_INCLUDE  : Include files
  642.                           DAPI_SEL_EXCLUDE  : Exclude files
  643.                           DAPI_SEL_IMAGE    : Add/Remove Image Backup
  644.                           DAPI_SEL_MOVIE    : Add/Remove MovieShop Backup
  645.  
  646.                DAPI_SEL_INCLUDE and DAPI_SEL_EXCLUDE:
  647.  
  648.                    Ptr1:    Pointer to Partition name for selection
  649.                    Ptr2:    Pointer to destination path or NULL if not to change
  650.                    Ptr3:    Pointer to relative path on this partition, inkl. Pattern,
  651.                             NULL if no selection (set dest. path only).
  652.                    Ptr4:    Pointer to date string or NULL if no date selection
  653.  
  654.                    Arg2:    0: Ignore Archive, 1: Arch. set, 2: Arch. unset
  655.                    Arg3:    TRUE: Include Subdirectories
  656.                    Arg4:    TRUE: Ignore empty directories
  657.  
  658.                DAPI_SEL_IMAGE:
  659.                    Ptr1:    Pointer to Devicename for Image Backup
  660.                    Ptr2:    Pointer to destination Device or NULL if not to change
  661.  
  662.                    Arg2:    TRUE if selected, FALSE otherwise
  663.  
  664.                DAPI_SEL_MOVIE:
  665.                    Ptr1:    Pointer to path for MovieShop project file
  666.                    Ptr2:    Pointer to destination project file or NULL if not to change
  667.  
  668.                    Arg2:    TRUE if selected, FALSE otherwise
  669.  
  670.  
  671.                This command can be used for two purposes:
  672.                 - Set the destination path for a partition/device/project in the backup
  673.                 - Select and deselect files/devices/projects to restore/compare
  674.  
  675.                Before you can use this command, you must have scanned the backup
  676.                medium using DAPI_STARTSCAN. When the scan has completed, all files
  677.                are selected (if the destination path is valid).
  678.                So if you want to restore/compare all files in the backup and
  679.                don't want to change the destination paths you can directly use
  680.                DAPI_STARTCOMPARE or DAPI_STARTRESTORE without using this command.
  681.  
  682.                If there are multiple assignments in the backup, each representation
  683.                of the assignment will be listed seperately and therefor must be
  684.                referred to seperately.
  685.  
  686.                See also DAPI_BACKSELECT
  687.  
  688.                Return values:
  689.  
  690.                Arg1:    Number of Partitions currently selected
  691.                Arg2:    Number of Directories currently selected
  692.                Arg3:    Number of Files currently selected
  693.                Arg4:    Size of all selected files
  694.  
  695.                if DAPI_Errorcode is set to DAPI_EC_SELECTFAILED then
  696.                Arg1:    Failure code
  697.                         0: Memory error
  698.                         1: Partition/device/project not in backup
  699.                            (or not scanned yet)
  700.                         2: Destination path not found
  701.                         3: No destination set for partition
  702.                         4: No Partition given
  703.                         5: Size of new destination device does not match image
  704.                            backup
  705.                         6: Unsupported value for Arg1
  706.                         100-...: Fehlercode von movieshop.library + 100
  707.             */
  708.  
  709. #define     DAPI_STARTRESTORE       0x0030005
  710.             /* Start restore or compare operation
  711.  
  712.                This command can only be given after DAPI_INITCOMPARE or DAPI_INITRESTORE
  713.                and after a successfull DAPI_STARTSCAN. You might also have used
  714.                DAPI_RESTSELECT to select the compare destination and to select /
  715.                deselect files.
  716.  
  717.                This message won't be replied until the operation is complete or aborted
  718.                due to an error or user intervention.
  719.  
  720.                Return values:
  721.  
  722.                Arg1:    Number of bytes read/compared
  723.                Arg2:    Time in seconds
  724.  
  725.                if DAPI_Errorcode is set to DAPI_EC_OPFAILED then
  726.                Arg1:    Failure code
  727.                         0: Operation could not be started (no files selected, no
  728.                            backup medium etc.)
  729.                         1: Misc. error while operation in progress
  730.             */
  731.  
  732.  
  733.  
  734. /* *********************************************************************** */
  735. /* *********************************************************************** */
  736. /*                                                                         */
  737. /* Report Codes                                                            */
  738. /*                                                                         */
  739. /* *********************************************************************** */
  740. /* *********************************************************************** */
  741.  
  742.  
  743. #define     DAPI_REQUEST            0x1000000       
  744.             /* User Request, Diavolo would have opened a requester to ask the
  745.                User something.
  746.  
  747.                Arg1:    Request Code (see below)
  748.                Ptr1:    Request Window Title
  749.                Ptr2:    Request Text
  750.                Ptr3:    Request Gadgets
  751.  
  752.                The texts should only be used to display them to the user. DON'T
  753.                rely on any information from the texts, as their layout will
  754.                differ in any language.
  755.                The gadget texts contains all options the user has. Each option
  756.                is seperated with a | . The hotkey is preceded by an _.
  757.  
  758.                Reply this message to tell Diavolo what to do. Set Arg1 to
  759.  
  760.                  ~0:    Diavolo displays the requester as normal
  761.                  0:     Diavolo reacts as if the rightmost options was selected by
  762.                         the user (= FALSE, cancel in most cases)
  763.                  1:     Diavolo reacts as if the leftmost option was selected by
  764.                         the user (=TRUE).
  765.                  2...x: Diavolo reacts as if the option x was selected by the
  766.                         user. Options are counted from left to right, starting
  767.                         with 1.
  768.  
  769.                  See below for valid return values. Return -1 for every unknown
  770.                  not specifically handled message.
  771.  
  772.             */
  773.  
  774. #define     DAPI_REQUEST_CANCELLED  0x1000001
  775.             /* User Request (DAPI_REQUEST) cancelled by Diavolo itself.
  776.  
  777.                Ptr1:    Pointer to DAPI_REQUEST message that has been cancelled.
  778.  
  779.                If the request had to be cancelled for some reason (e.g. Disk inserted
  780.                or operation cancelled) Diavolo will send this message.
  781.  
  782.                Reply both messages immediatley (the original DAPI_REQUEST message
  783.                and this one). Diavolo will wait until both messages have been replied
  784.                before continuing. Any values set in these returns will be ignored.
  785.  
  786.                You should reply this message, even if you don't know of any
  787.                DAPI_REQUEST message with the given address.
  788.             */
  789.  
  790. #define     DAPI_CLOSEDOWN        0x1001001
  791.             /* Diavolo is going to quit. Reply this message and break connection
  792.                with DAPI_GOODBYE */
  793.  
  794.  
  795. /* *********************************************************************** */
  796. /* *********************************************************************** */
  797. /*                                                                         */
  798. /* Request Codes                                                           */
  799. /*                                                                         */
  800. /* *********************************************************************** */
  801. /* *********************************************************************** */
  802.  
  803.  
  804. /* The request codes are sent before Diavolo opens a requester to tell or ask the user
  805.    something. They are part of a DAPI_REQUEST message.
  806.  
  807.    Here's a list of all possible request codes.
  808.  
  809.    Process ONLY requests you know exactly what to do with.
  810.    All other requests should simply be returned to Diavolo to display them (Return -1)
  811.    or displayed by your application itself (using the text and gadgets provided by the
  812.    DAPI_REQUEST message).
  813.  
  814.  
  815.    The request code consists of several parts:
  816.  
  817.    Example:        0xAABCDD
  818.                      \/||\/
  819.                      | || |
  820.                      | || --------- Codeindex
  821.                      | ||
  822.                      | ||---------- Backup Medium
  823.                      | |            0: Unspecified, 1: Disk, 2: File, 3: SCSI
  824.                      | |
  825.                      | |----------- Operation Mode
  826.                      |              0: Unspecified, 1: Backup, 2: Restore/compare
  827.                      |
  828.                      |------------- Importance level
  829.                                     2: Proceed requests (e.g. 'Save prefs?')
  830.                                     3: Action requests (e.g. 'Insert disk')
  831.                                     4: Abortion requests (e.g. 'Abort backup?')
  832.                                     5: Warning messages (e.g. 'DOS disk in drive')
  833.                                     6: Error messages (e.g. 'Error in filter')
  834.                                     7: Fatal errors (e.g. 'Out of memory')
  835.                                     8: Private messages, not reported to application
  836.  
  837. */
  838.  
  839.  
  840.  
  841.  
  842. /* *********************************************************************** */
  843. /* Proceed requests                                                        */
  844. /* *********************************************************************** */
  845.  
  846. /* General */
  847.  
  848. #define     DAPI_RC_SAVEPREFS       0x200001    /* Prefs changed, save? 1: Yes, 2: No, 0: Cancel Quit */
  849. #define     DAPI_RC_CLEARFILELISTS  0x200002    /* Clear all filelists? 1: Yes, 0: No */
  850.  
  851.  
  852. /* General, SCSI */
  853.  
  854. #define     DAPI_RC_ERASETAPE       0x200301    /* SCSI: Erase tape? 1: Yes, 0: No */
  855. #define     DAPI_RC_ERASEPART       0x200302    /* SCSI: Partitions found on tape. 1: Reformat with 1 part.
  856.                                                    2: Erase every partition, 0: Cancel */
  857.  
  858.  
  859.  
  860. /* *********************************************************************** */
  861. /* Action requests                                                         */
  862. /* *********************************************************************** */
  863.  
  864. /* General, Disk */
  865.  
  866. #define     DAPI_RC_INSERTDISK      0x300101    /* Disk: Insert next disk in any drive. 1: Retry, 0: Cancel */
  867.  
  868.  
  869. /* General, SCSI */
  870.  
  871. #define     DAPI_RC_INSERTTAPE      0x300301    /* SCSI: Insert next tape into drive. 1: Retry, 0: Cancel */
  872.  
  873.  
  874. /* General, Direct */
  875.  
  876. #define     DAPI_RC_INSERTMEDIUM    0x300401    /* Direct: Insert next medium in device. 1: Retry, 0: Cancel */
  877.  
  878.  
  879. /* Backup, Disk */
  880.  
  881. #define     DAPI_RC_INSERTDIRDISK   0x301101    /* Disk: Insert 1st disk, to write dir info. 1: Retry, 0: Cancel */
  882.  
  883.  
  884. /* Backup, File */
  885.  
  886. #define     DAPI_RC_FILEWRITEDIR    0x301201    /* File: Going to write dir info, replace medium with first
  887.                                                    file of backup or set dest. to first file. 1: Retry,
  888.                                                    2: Change destination, 0: Cancel */
  889. #define     DAPI_RC_NEXTFILE        0x301202    /* File: Need next file to continue restore. 1: Retry,
  890.                                                    2: Change source, 0: Cancel */
  891.  
  892.  
  893. /* Backup, Direct */
  894.  
  895. #define     DAPI_RC_INSERTDIRMEDIUM 0x301401    /* Direct: Insert 1st medium, to write dir info. 1: Retry, 0:Cancel */
  896.  
  897.  
  898.  
  899. /* Restore, Disk */
  900.  
  901. #define     DAPI_RC_SCANINSERTDISK  0x302101    /* Disk: Insert disk for scanning. 1: Retry, 2: Rebuild, 0: Cancel */
  902. #define     DAPI_RC_SCANINSERTDISK1 0x302102    /* Disk: Insert disk for rebuild scanning. 1: Retry, 2: Skip disk,
  903.                                                    0: Cancel */
  904.  
  905. /* Restore, SCSI */
  906.  
  907. #define     DAPI_RC_INSERTLASTTAPE  0x302301    /* SCSI: Insert last tape for rebuilding index. 1: Already present,
  908.                                                    0: Cancel */
  909. #define     DAPI_RC_USETHISBACKUP   0x302302    /* SCSI: Manual tape scan, do you want to restore this backup?
  910.                                                    1: Use, 2: Next, 3: New tape, 0: Cancel */
  911.  
  912.  
  913.  
  914. /* *********************************************************************** */
  915. /* Abortion requests                                                       */
  916. /* *********************************************************************** */
  917.  
  918. #define     DAPI_RC_ABORTOP         0x400001    /* User has pressed PAUSE/ABORT, 1: Continue operation,
  919.                                                    0: Abort operation */
  920.  
  921.  
  922.  
  923. /* *********************************************************************** */
  924. /* Warning messages                                                        */
  925. /* *********************************************************************** */
  926.  
  927. /* General */
  928.  
  929. #define     DAPI_RC_NOXPKLIB        0x500001    /* XPK library not found, no packer available */
  930.  
  931.  
  932. /* Backup */
  933.  
  934. #define     DAPI_RC_SETARCHERR      0x501001    /* Couldn't set archive flag for this file */
  935.  
  936.  
  937. /* Backup, Disk */
  938.  
  939. #define     DAPI_RC_BACKDISK        0x501101    /* Disk: Disk from another backup set in drive. 1: Use,
  940.                                                          2: Next disk, 0: Cancel */
  941. #define     DAPI_RC_SAMEBACKDISK    0x501102    /* Disk: Disk already used in this backup set. 1: Next disk,
  942.                                                          0: cancel */
  943. #define     DAPI_RC_DOSDISK         0x501103    /* Disk: DOS-formatted disk in drive. 1: Use, 2: Next disk,
  944.                                                          0: cancel */
  945. #define     DAPI_RC_DISKPROTECT     0x501104    /* Disk: Disk write protected. 1: Retry, 2: Next disk, 0: Cancel */
  946. #define     DAPI_RC_DISKVERERR      0x501105    /* Disk: Verify error. 1: Retry, 2: Other disk, 3: Skip track,
  947.                                                          0: Cancel */
  948. #define     DAPI_RC_DISKVERERR1     0x501106    /* Disk: Verify error. Skip not possible. 1: Retry, 2: Other disk,
  949.                                                          0: Cancel */
  950. #define     DAPI_RC_DISKVERERR2     0x501107    /* Disk: Verify error. Skip and other disk not possible. 1: Retry,
  951.                                                          0: Cancel */
  952. #define     DAPI_RC_TDERR           0x501108    /* Disk: Read/Write error. 1: Retry, 2: Other disk, 0: Cancel */
  953. #define     DAPI_RC_TDERR1          0x501109    /* Disk: Read/Write error. Other disk not possible. 1: Retry,
  954.                                                          0: Cancel */
  955.  
  956.  
  957. /* Backup, File */
  958.  
  959. #define     DAPI_RC_NODESTFILE      0x501201    /* File: No destination filename or error writing to it.
  960.                                                          1: Retry, 2: Change destination, 0: Cancel */
  961. #define     DAPI_RC_DESTFULL        0x501202    /* File: Destination volume full. 1: Retry (after medium has been
  962.                                                          replaced) 2: Change destination, 0: Cancel */
  963. #define     DAPI_RC_FILEEXISTS      0x501203    /* File: Destination file exists already. 1: Use,
  964.                                                          2: Change destination, 0: Cancel */
  965.  
  966.  
  967. /* Backup, SCSI */
  968.  
  969. #define     DAPI_RC_SCSIWRTINDXERR  0x501301    /* SCSI: Error writing index file. 1: Retry, 2: Ignore, 0: Cancel */
  970. #define     DAPI_RC_TAPEUSED        0x501302    /* SCSI: Tape already used in this backup. 1: Retry, 0: Cancel */
  971. #define     DAPI_RC_TAPEPROTECTED   0x501303    /* SCSI: Tape protected. 1: Retry, 0: Cancel */
  972. #define     DAPI_RC_TAPEFULL        0x501304    /* SCSI: Tape full, replace. 1: Retry, 0: Cancel */
  973. #define     DAPI_RC_INDEXERR        0x501305    /* SCSI: Indexfile missing or wrong. 1: Overwrite tape,
  974.                                                          2: Change tape, 0: Cancel */
  975. #define     DAPI_RC_ALIENTAPE       0x501306    /* SCSI: Tape empty or unknown. 1: Overwrite tape,
  976.                                                          2: Change tape, 0: Cancel */
  977. #define     DAPI_RC_TAPEPROTECTED   0x501303    /* SCSI: Tape protected. 1: Retry, 0: Cancel */
  978.  
  979.  
  980. #define     DAPI_RC_TAPEPROTECTED   0x501303    /* SCSI: Tape protected. 1: Retry, 0: Cancel */
  981.  
  982.  
  983. /* Backup, Direct */
  984.  
  985. #define     DAPI_RC_MEDIUMPROTECTED 0x501401    /* Direct: Medium protected. 1: Retry, 0: Cancel */
  986. #define     DAPI_RC_DIRECTUNKNOWN   0x501402    /* Direct: Medium contains unknown data. 1: Overwrite, 2: Other medium
  987.                                                            0: Cancel */
  988. #define     DAPI_RC_DIRECTERROR     0x501403    /* Direct: Medium ID could not be read. 1: Retry 0: Cancel */
  989. #define     DAPI_RC_DIRECTERROR1    0x501404    /* Direct: Read/Write error on Medium. 1: Retry, 2: Other medium,
  990.                                                            0: Cancel */
  991. #define     DAPI_RC_DIRECTERROR2    0x501405    /* Direct: Read/Write error on Medium. Other medium not possible.
  992.                                                            1: Retry, 0: Cancel */
  993. #define     DAPI_RC_DIRECTDIRWRONG  0x501406    /* Direct: Need medium x, found medium y (while writing directory)
  994.                                                            1: Retry, 0: Cancel */
  995. #define     DAPI_RC_DIRECTSAMEBAK   0x501407    /* Direct: Tape from same backup set, need other tape 1: Retry 0: Cancel */
  996. #define     DAPI_RC_DIRECTOTHERBAK  0x501408    /* Direct: Tape from another bakup set. 1: Use it, 2: Other tape,
  997.                                                            0: Cancel */
  998.  
  999.  
  1000. /* Restore */
  1001.  
  1002. #define     DAPI_RC_DOOVERWRT       0x502001    /* File exists. 1: Overwrite, 2: Skip, 3: Options, 0: Cancel */
  1003. #define     DAPI_RC_FILEWRTERR      0x502002    /* Error writing file. 1: Retry, 2: Ignore, 0: Cancel */
  1004. #define     DAPI_RC_FILEPROPERR     0x502003    /* Error setting file's flags and comment. 1: Retry
  1005.                                                    2: Ignore, 0: Cancel */
  1006. #define     DAPI_RC_RENAMEERR       0x502004    /* Error renaming file. 1: Retry, 2: Ignore, 0: Cancel */
  1007. #define     DAPI_RC_FILEINCOMPL     0x502005    /* File incomplete. 1: Restore, 2: Skip, 0: Cancel */
  1008. #define     DAPI_RC_DOIMGOVERWRITE  0x502006    /* Overwrite dest. partition? 1: Overwrite, 2: Skip, 0: Cancel */
  1009. #define     DAPI_RC_DOMOVIEOVERWRITE 0x502007   /* Overwrite dest. MovieShop project? 1: Overwrite, 2: Skip,
  1010.                                                    0: Cancel */
  1011.  
  1012.  
  1013. /* Restore, Disk */
  1014.  
  1015. #define     DAPI_RC_WRONGDISK       0x502101    /* Disk: Wrong disk. 1: Retry, 2: Next disk, 0: Cancel */
  1016. #define     DAPI_RC_SCANWRONGDISK   0x502102    /* Disk: Wrong disk during man. scan. 1: Retry, 2: Next disk
  1017.                                                    3: skip all missing disks, 0: Cancel */
  1018. #define     DAPI_RC_REINSERTDISK    0x502103    /* Disk: Reinsert disk. 1: Retry, 2: Next disk, 0: Cancel */
  1019. #define     DAPI_RC_TDMANSCANERR    0x502104    /* Disk: Read error while scanning disk. 1: Retry, 2: Skip track
  1020.                                                    3: Skip disk, 0: Cancel */
  1021. #define     DAPI_RC_TDMANSCANERR1   0x502105    /* Disk: Read error while scanning disk. Skip track not possible.
  1022.                                                    1: Retry, 2: Skip disk, 0: Cancel */
  1023. #define     DAPI_RC_TDSCANERR       0x502106    /* Disk: Read error while reading index. 1: Retry, 2: Other disk,
  1024.                                                    3: Rebuild, 0: Cancel */
  1025. #define     DAPI_RC_TDSCANERR1      0x502107    /* Disk: Read error while reading index. Other disk not possible.
  1026.                                                    1: Retry, 2: Rebuild, 0: Cancel */
  1027. #define     DAPI_RC_TDREADERR       0x502108    /* Disk: Read error. 1: Retry, 2: Skip track, 3: Skip disk,
  1028.                                                    0: Cancel */
  1029. #define     DAPI_RC_TDREADERR1      0x502109    /* Disk: Read error, unknown disk. 1: Retry, 2: Next drive,
  1030.                                                    0: Cancel */
  1031.  
  1032.  
  1033. /* Restore, File */
  1034.  
  1035. #define     DAPI_RC_NOSRCFILE       0x502201    /* File: Source file not found or read error. 1: Retry,
  1036.                                                    2: Change source, 3: Cancel */
  1037.  
  1038.  
  1039. /* Restore, SCSI */
  1040.  
  1041. #define     DAPI_RC_INDXREADERR     0x502301    /* SCSI: No index or index error. 1: Rebuild tape index, 2: Scan tape,
  1042.                                                    3: Change tape, 0: Cancel */
  1043. #define     DAPI_RC_WRONGTAPE       0x502302    /* SCSI: Wrong tape. 1: Retry, 0: Cancel */
  1044. #define     DAPI_RC_NOCONTENTS      0x502303    /* SCSI: Contents of backup not found. Not last tape?
  1045.                                                    1: Retry, 0: Cancel */
  1046. #define     DAPI_RC_READALIENTAPE   0x502304    /* SCSI: Tape empty or unknown. 1: Change tape, 0: Cancel */
  1047. #define     DAPI_RC_SCANLASTTAPE    0x502305    /* SCSI: Rebuild tape index: Last backup on tape incomplete, insert
  1048.                                                    last tape of backup. 1: Retry, 2: No tape, 0: Cancel */
  1049.  
  1050.  
  1051. /* Restore, Direct */
  1052.  
  1053. #define     DAPI_RC_DIRECTRESTWRONG 0x502401    /* Direct: Wrong medium inserted. 1: Retry 0: Cancel */
  1054. #define     DAPI_RC_DIRECTRESTWRONG2 0x502402   /* Direct: Medium with higher nr. than requested inserted. 1:Retry
  1055.                                                    2: Skip missing media, 0: Cancel */
  1056. #define     DAPI_RC_DIRECTRESTERROR 0x502403    /* Direct: Medium ID could not be read. 1: Retry 0: Cancel */
  1057. #define     DAPI_RC_DIRECTRESTERROR1 0x502404    /* Direct: Error while reading from Medium. 1: Retry 0: Cancel */
  1058. #define     DAPI_RC_DIRECTRESTERROR2 0x502405    /* Direct: Error while reading from Medium. 1: Retry, 2: Skip track
  1059.                                                     0 : Cancel */
  1060.  
  1061.  
  1062.  
  1063. /* *********************************************************************** */
  1064. /* Error messages                                                          */
  1065. /* *********************************************************************** */
  1066.  
  1067. /* General */
  1068.  
  1069. #define     DAPI_RC_EXAMINEDIRERR   0x600001    /* Couldn't examine directory (scan) */
  1070. #define     DAPI_RC_LOCKDIRERR      0x600002    /* Couldn't lock on directory (scan) */
  1071. #define     DAPI_RC_SCANDIRERR      0x600003    /* Couldn't scan directory (scan) */
  1072. #define     DAPI_RC_SAVEPREFSERR    0x600004    /* Couldn't save preferences */
  1073. #define     DAPI_RC_LOADPREFSERR    0x600005    /* Couldn't load preferences */
  1074. #define     DAPI_RC_NOREPORTFILE    0x600006    /* Couldn't open or write to report file */
  1075. #define     DAPI_RC_FILTERERR       0x600007    /* Error in filterfile. 1: Ignore, 0: Cancel */
  1076. #define     DAPI_RC_INVALIDDATE     0x600008    /* Invalid date in filter. */
  1077. #define     DAPI_RC_SIZEEXCEEDED    0x600009    /* Size of selected files exceeds 4GB */
  1078.  
  1079.  
  1080. /* SCSI */
  1081.  
  1082. #define     DAPI_RC_SCSIERR         0x600301    /* SCSI: SCSI Error. 1: Retry, 0: Cancel */
  1083. #define     DAPI_RC_ENDOFTAPE       0x600302    /* SCSI: Unexpected end of tape. */
  1084.  
  1085.  
  1086. /* Direct */
  1087.  
  1088. #define     DAPI_RC_DIRECTNODATA    0x600401    /* Direct: Could not get Device information 1: Retry 0: Cancel */
  1089.  
  1090.  
  1091. /* Backup */
  1092.  
  1093. #define     DAPI_RC_FILENOTFOUND    0x601001    /* File to backup not found. 1: Retry, 2: Ignore, 0: Cancel */
  1094. #define     DAPI_RC_FILEREADERR     0x601002    /* Error while reading file. 1: Retry, 2: Ignore, 0: Cancel */
  1095. #define     DAPI_RC_PACKERR         0x601003    /* Error compressing file. 1: Retry, 0: Cancel */
  1096. #define     DAPI_RC_IMAGEREADERR    0x601004    /* Error reading from Device (Imagebackup). 1: Retry, 2: Ignore,
  1097.                                                    0: Cancel */
  1098. #define     DAPI_RC_MOVIEBACKERR    0x601005    /* Error reading MovieShop data. 1: Retry, 2: Ignore, 0: Cancel */
  1099.  
  1100.  
  1101. /* Restore */
  1102.  
  1103. #define     DAPI_RC_PATHNOTFOUND    0x602001    /* Restore destination path not found */
  1104. #define     DAPI_RC_STRUCTINVALID   0x602002    /* Backup structure invalid */
  1105. #define     DAPI_RC_UNPACKERR       0x602003    /* Error unpacking data. 1: Retry, 0: Cancel */
  1106. #define     DAPI_RC_WRONGPW         0x602004    /* Wrong password. 1: New PW, 0: Cancel */
  1107. #define     DAPI_RC_IMAGEDESTMISMATCH 0x602005  /* Image backup destination not correct size */
  1108. #define     DAPI_RC_IMAGEDESTNOTFOUND 0x602006  /* Image backup destination not found */
  1109. #define     DAPI_RC_RESTIMGREADERR  0x602007    /* Error reading from Device (Imagebackup). 1: Retry, 2: Ignore,
  1110.                                                    0: Cancel */
  1111. #define     DAPI_RC_RESTIMGWRITEERR 0x602008    /* Error writing to Device (Imagebackup). 1: Retry, 2: Ignore,
  1112.                                                    0: Cancel */
  1113. #define     DAPI_RC_MOVIEPRJNOTFOUND 0x602009   /* Could not find MovieShop project for destination. */
  1114. #define     DAPI_RC_MOVIERESTERR    0x602010    /* Error reading or writing MovieShop data. 1: Retry, 2: Ignore,
  1115.                                                    0: Cancel */
  1116.  
  1117.  
  1118. /* Restore, Disk */
  1119.  
  1120. #define     DAPI_RC_DISKSTRINV      0x602101    /* Disk: Dir. not found or structure invalid.
  1121.                                                    1: Rebuild, 0: Cancel */
  1122.  
  1123.  
  1124. /* Restore, SCSI */
  1125.  
  1126. #define     DAPI_RC_BACKNOTFOUND    0x602301    /* SCSI: Backup not found on tape. 1: Retry, 0: Cancel */
  1127. #define     DAPI_RC_NOMOREBACKUPS   0x602302    /* SCSI: No more backups on this tape. */
  1128.  
  1129.  
  1130.  
  1131. /* *********************************************************************** */
  1132. /* Fatal errors                                                            */
  1133. /* *********************************************************************** */
  1134.  
  1135. #define     DAPI_RC_MEMERROR        0x700001    /* Out of memory */
  1136. #define     DAPI_RC_OPFAILED        0x700002    /* Operation failed (backup, restore, compare) */
  1137. #define     DAPI_RC_NOXPK           0x700003    /* No XPK library, but required */
  1138. #define     DAPI_RC_SCSIOPENERR     0x700004    /* Couldn't open SCSI device or not a seq. tape device */
  1139. #define     DAPI_RC_DRIVENEEDED     0x700005    /* No disk drive active */
  1140. #define     DAPI_RC_FILTERNOTFOUND  0x700006    /* Couldn't open or read filterfile */
  1141. #define     DAPI_RC_DIRECTOPENERR   0x700007    /* Direct access device not found or open error */
  1142. #define     DAPI_RC_FILENEEDED      0x700008    /* No filename given for backup to/from file */
  1143. #define     DAPI_RC_FILEGETNAMEERR  0x700009    /* Could not determine true destination path
  1144.                                                    (backup to file) */
  1145.  
  1146.  
  1147. /* *********************************************************************** */
  1148. /* Private codes                                                           */
  1149. /* *********************************************************************** */
  1150.  
  1151. #define     DAPI_RC_PRIVATE         0x800000    /* Private requester code */
  1152.  
  1153.  
  1154.  
  1155. /* *********************************************************************** */
  1156. /* *********************************************************************** */
  1157. /*                                                                         */
  1158. /* Error codes                                                             */
  1159. /*                                                                         */
  1160. /* *********************************************************************** */
  1161. /* *********************************************************************** */
  1162.  
  1163. #define     DAPI_EC_NOERROR         0           /* Request completed successfully */
  1164. #define     DAPI_EC_INUSE           1           /* API already used by another application */
  1165. #define     DAPI_EC_NOTAVAILABLE    2           /* Command currently not possible or unknown */
  1166. #define     DAPI_EC_NOTMETYET       3           /* Caller unknown, RENDEZVOUS first */
  1167. #define     DAPI_EC_INVALIDCONFIG   4           /* DAPI_CHANGECONFIG: Structure invalid */
  1168. #define     DAPI_EC_SELECTFAILED    5           /* DAPI_xxxSELECT: Failed */
  1169. #define     DAPI_EC_OPPENDING       6           /* Goodbye not possible: Operation pending. Use
  1170.                                                    DAPI_ABORTOPERATION first. */
  1171. #define     DAPI_EC_OPFAILED        7           /* Operation failed */
  1172.  
  1173.  
  1174. /* *********************************************************************** */
  1175. /* *********************************************************************** */
  1176. /*                                                                         */
  1177. /* Codes fuer DAPI_BACKSELECT and DAPI_RESTSELECT                          */
  1178. /*                                                                         */
  1179. /* *********************************************************************** */
  1180. /* *********************************************************************** */
  1181.  
  1182.  
  1183. #define     DAPI_SEL_INCLUDE        1           /* Include files and directories */
  1184. #define     DAPI_SEL_EXCLUDE        2           /* Exclude files and directories */
  1185. #define     DAPI_SEL_IMAGE          3           /* Image backups */
  1186. #define     DAPI_SEL_MOVIE          4           /* MovieShop Backups */
  1187.  
  1188.  
  1189.